import time
import image1
# import image2
# import data_ce as dc
# from socket import *
from ILI9431c import ILI9341
from machine import Pin, SoftSPI

LCD_WIDTH = 50
LCD_HEIGHT = 50

#esp32s3管脚
spi = SoftSPI(
    baudrate=800000,
    mosi = Pin(11),
    miso = Pin(13),
    sck=Pin(12)
    )

display = ILI9341(
    spi,
    cs=Pin(8),
    dc=Pin(6),
    rst=Pin(5),
    bl=Pin(7),
    w=240,
    h=320,
    r=0)


image = image1.Imagedata1
display.arrmap(0, 0, LCD_WIDTH, LCD_HEIGHT, image)




